From: Florian Müllner Date: Wed, 6 Nov 2013 17:22:47 +0000 (+0100) Subject: dnd: Don't queue an idle handler if we already have one X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~3067 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=fce2930b859af8530c4fed9f258e8186649455d2;p=gnome-shell.git dnd: Don't queue an idle handler if we already have one Removing an existing source before scheduling a new one is not wrong, but slightly less effective than doing nothing and relying on the previously created source to do the job. https://bugzilla.gnome.org/show_bug.cgi?id=711555 --- diff --git a/js/ui/dnd.js b/js/ui/dnd.js index 8172ac51c..042cd195e 100644 --- a/js/ui/dnd.js +++ b/js/ui/dnd.js @@ -391,7 +391,7 @@ const _Draggable = new Lang.Class({ _queueUpdateDragHover: function() { if (this._updateHoverId) - GLib.source_remove(this._updateHoverId); + return; this._updateHoverId = GLib.idle_add(GLib.PRIORITY_DEFAULT, Lang.bind(this, this._updateDragHover));